Matthias Clasen [Fri, 17 Jul 2020 00:27:00 +0000 (20:27 -0400)]
docs: Document GtkBitsetIter
Matthias Clasen [Thu, 16 Jul 2020 23:52:08 +0000 (19:52 -0400)]
docs: Add an example
Add a small example for setting up columnview sorting.
Matthias Clasen [Thu, 16 Jul 2020 23:45:21 +0000 (19:45 -0400)]
docs: Fix examples
The formatting for examples in the GtkExpression
long description was messed up.
Matthias Clasen [Thu, 16 Jul 2020 23:44:24 +0000 (19:44 -0400)]
docs: Link to GtkTreeRowReference
The list overview cross-reference table links
to all objects, except for this one.
Matthias Clasen [Thu, 16 Jul 2020 23:43:39 +0000 (19:43 -0400)]
docs: Add GtkTreeExpander
We want to link to it from various places, so it needs
to be present in the docs.
Matthias Clasen [Thu, 16 Jul 2020 21:03:21 +0000 (21:03 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
gtk-demo: Use better api
See merge request GNOME/gtk!2254
Matthias Clasen [Thu, 16 Jul 2020 20:24:49 +0000 (16:24 -0400)]
gtk-demo: Use better api
We have a getter for the model, lets use it.
Benjamin Otte [Thu, 16 Jul 2020 19:43:45 +0000 (19:43 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
Wip/otte/for master
See merge request GNOME/gtk!2251
Matthias Clasen [Thu, 16 Jul 2020 18:52:22 +0000 (18:52 +0000)]
Merge branch 'missing-exports' into 'master'
Add missing exports for GtkColumnView methods.
See merge request GNOME/gtk!2252
Benjamin Otte [Sun, 12 Jul 2020 05:49:53 +0000 (07:49 +0200)]
listitemmanager: Do a better job on double items
Previously, we would unparent the existing item that we were about
to reuse, and not the duplicate one.
Change that.
Benjamin Otte [Sun, 12 Jul 2020 05:02:04 +0000 (07:02 +0200)]
stringfilter: Make the constructor take an expression
An expression is critically important for a string filter and people
should be made aware of it when constructing the filter.
Benjamin Otte [Sun, 12 Jul 2020 01:35:11 +0000 (03:35 +0200)]
gtk-demo: Don't make demos modal
That way, demo windows can be maximized and multiple demos can run at
once.
It's especially useful when using --run because the main window is
invisible then.
Benjamin Otte [Sat, 11 Jul 2020 03:15:00 +0000 (05:15 +0200)]
testsuite: Don't be too exhaustive
The test was taking over 60s on CI, that's a but much.
Benjamin Otte [Fri, 10 Jul 2020 00:13:50 +0000 (02:13 +0200)]
testsuite: Add a case with escaped Latin-1 code
This came up in recent g_uri_escape() discussions.
Matthias Clasen [Thu, 16 Jul 2020 18:05:43 +0000 (18:05 +0000)]
Merge branch 'wip/otte/vector' into 'master'
Arrays
See merge request GNOME/gtk!2197
Matthias Clasen [Thu, 16 Jul 2020 17:39:16 +0000 (17:39 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2250
Andreas Persson [Thu, 16 Jul 2020 16:58:41 +0000 (18:58 +0200)]
Add missing exports for GtkColumnView methods.
GDK_AVAILABLE_IN_ALL was missing for one method in GtkColumnView and one
in GtkColumnViewColumn.
Matthias Clasen [Thu, 16 Jul 2020 12:49:38 +0000 (08:49 -0400)]
treesorter tests: Add a comment
This looks like a leak, but isn't one.
Add a comment to that effect.
Benjamin Otte [Fri, 3 Jul 2020 23:13:39 +0000 (01:13 +0200)]
stringlist: Convert to array
Stringlists are usually built and then never modified, and accessing
items through an array is faster.
Benjamin Otte [Fri, 3 Jul 2020 02:53:50 +0000 (04:53 +0200)]
snapshot: Use GdkArray for the state stack
Benjamin Otte [Thu, 16 Jul 2020 14:33:14 +0000 (16:33 +0200)]
array: Add a bunch of new features
* GDK_ARRAY_BY_VALUE
#define this to get GArray-like behavior
* gdk_array_splice (v, 0, 0, NULL, 25)
Adding items but passing NULL as the items will zero() them.
* gdk_array_set_size()
A nicer way to call gdk_array_splice()
* constify getters
Benjamin Otte [Fri, 3 Jul 2020 02:21:07 +0000 (04:21 +0200)]
icontheme: Use GdkArray
Benjamin Otte [Thu, 2 Jul 2020 21:32:04 +0000 (23:32 +0200)]
array: Add null-termination
Benjamin Otte [Thu, 2 Jul 2020 21:32:04 +0000 (23:32 +0200)]
snapshot: Port node list to GdkArray
Benjamin Otte [Thu, 2 Jul 2020 20:59:40 +0000 (22:59 +0200)]
snapshot: Move structs into .c file
They aren't used anywhere else.
Benjamin Otte [Thu, 2 Jul 2020 18:51:16 +0000 (20:51 +0200)]
Remove preallocated array code
Now with GdkArray, we can use that one instead.
Benjamin Otte [Thu, 2 Jul 2020 18:50:14 +0000 (20:50 +0200)]
main: Use a GdkArray
Benjamin Otte [Thu, 2 Jul 2020 16:30:55 +0000 (18:30 +0200)]
cssselector: Use GdkArray
Benjamin Otte [Thu, 2 Jul 2020 15:23:09 +0000 (17:23 +0200)]
Add GdkArray
This is a scary idea where you #define a bunch of preprocessor values
and then #include "gdkarrayimpl.c" and end up with a dynamic array for
that data type.
See https://en.wikipedia.org/wiki/X_Macro for what's going on.
What are the advantages over using GArray or GPtrArray?
* It's typesafe
Because it works like C++ templates, we can use the actual type of
the object instead of having to use gpointer.
* It's one less indirection
instead of 2 indirections via self->array->data, this array is
embedded, so self->array is the actual data, and just one indirection
away. This is pretty irrelevant in general, but can be very noticable
in tight loops.
* It's all inline
Because the whole API is defined as static inline functions, the
compiler has full access to everything and can (and does) optimize
out unnecessary calls, thereby speeding up some operations quite
significantly, when full optimizations are enabled.
* It has more features
In particular preallocation allows for avoiding malloc() calls, which
can again speed up tight loops a lot.
But there's also splice(), which is very useful when used with
listmodels.
Benjamin Otte [Tue, 7 Jul 2020 21:18:46 +0000 (23:18 +0200)]
sortlistmodel: Remove forgotten G_PARAM_CONSTRUCT_ONLY
Matthias Clasen [Thu, 16 Jul 2020 12:49:22 +0000 (08:49 -0400)]
multiselection tests: Plug a leak
g_list_model_get_item is transfer full.
Matthias Clasen [Thu, 16 Jul 2020 12:48:56 +0000 (08:48 -0400)]
filterlistmodel tests: Plug a leak
g_list_model_get_item is transfer full.
Matthias Clasen [Thu, 16 Jul 2020 12:48:36 +0000 (08:48 -0400)]
filter tests: Plug a leak
g_list_model_get_item is transfer full.
Matthias Clasen [Thu, 16 Jul 2020 12:48:09 +0000 (08:48 -0400)]
printunixdialog: Plug a leak
g_list_model_get_item is transfer full.
Matthias Clasen [Thu, 16 Jul 2020 12:47:59 +0000 (08:47 -0400)]
Cosmetics
Matthias Clasen [Thu, 16 Jul 2020 12:47:36 +0000 (08:47 -0400)]
placessidebar: Plug a leak
g_list_model_get_item is transfer full.
Matthias Clasen [Thu, 16 Jul 2020 12:47:05 +0000 (08:47 -0400)]
filechoosernativewin32: Plug a leak
g_list_model_get_item is transfer full.
Matthias Clasen [Thu, 16 Jul 2020 12:46:44 +0000 (08:46 -0400)]
columnlistitemfactory: Plug a leak
g_list_model_get_item is transfer full.
Matthias Clasen [Thu, 16 Jul 2020 12:46:18 +0000 (08:46 -0400)]
applicationaccels: Plug a leak
g_list_model_get_item is transfer full.
Matthias Clasen [Thu, 16 Jul 2020 11:49:18 +0000 (07:49 -0400)]
columviewsorter: Add an assertion
Matthias Clasen [Thu, 16 Jul 2020 12:52:46 +0000 (12:52 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2249
Matthias Clasen [Thu, 16 Jul 2020 02:14:36 +0000 (22:14 -0400)]
inspector: Avoid losing a reference
This was copying the example in the treelistrowsorter
docs that the previous commit fixed, so we apply
the same fix here.
Matthias Clasen [Thu, 16 Jul 2020 02:13:36 +0000 (22:13 -0400)]
treelistrowsorter: Fix a faulty example
gtk_tree_list_row_sorter_new() consumes the
sorter, so we can't pass gtk_column_view_get_sorter(),
since that is transfer none.
Matthias Clasen [Thu, 16 Jul 2020 01:22:21 +0000 (21:22 -0400)]
inspector: Don't derive from GtkBox
We don't do that anymore. A bin layout
is sufficient here.
Matthias Clasen [Thu, 16 Jul 2020 00:28:05 +0000 (20:28 -0400)]
inspector: Drop a Private struct
These are really not needed in the inspector.
Matthias Clasen [Thu, 16 Jul 2020 00:24:00 +0000 (20:24 -0400)]
inspector: Drop an unused field
Efstathios Iosifidis [Wed, 15 Jul 2020 18:12:26 +0000 (18:12 +0000)]
Update Greek translation
Matthias Clasen [Wed, 15 Jul 2020 16:52:05 +0000 (16:52 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
inspector: Use substring matching in the property list
See merge request GNOME/gtk!2247
Matthias Clasen [Wed, 15 Jul 2020 15:29:06 +0000 (11:29 -0400)]
inspector: Use substring matching in the property list
This is convenient for things like "set both hexpand and
vexpand", since you can then search for "expand"
Florentina Mușat [Wed, 15 Jul 2020 08:58:58 +0000 (08:58 +0000)]
Update Romanian translation
Matthias Clasen [Wed, 15 Jul 2020 01:41:35 +0000 (01:41 +0000)]
Merge branch 'wip/jimmac/file-dialog-sidebar-color' into 'master'
Adwaita: sidebar color for file picker
See merge request GNOME/gtk!2242
Matthias Clasen [Wed, 15 Jul 2020 01:40:49 +0000 (01:40 +0000)]
Merge branch 'wip/fix-picom-crasher' into 'master'
x11: Don't set up frame sync fence on unsupported compositors
Closes #2927
See merge request GNOME/gtk!2245
Matthias Clasen [Wed, 15 Jul 2020 01:38:55 +0000 (01:38 +0000)]
Merge branch 'idle-inhibit' into 'master'
Add support for idle inhibition on Wayland
Closes #2202
See merge request GNOME/gtk!2226
Matthias Clasen [Wed, 15 Jul 2020 01:38:38 +0000 (01:38 +0000)]
Merge branch 'shortcuts-section-reflow-fix' into 'master'
Fix shortcuts section reflow
Closes #2928
See merge request GNOME/gtk!2246
Emmanuel Gil Peyrot [Fri, 10 Jul 2020 13:53:05 +0000 (15:53 +0200)]
gtk/wayland: Add support for idle inhibition in GtkApplication
This feature was previously only supported on DBus compositors, such as
Mutter, this adds support for other compositors such as all of those
based on wlroots.
This implementation prefers the idle-inhibit Wayland protocol to the
DBus version if it is available, since the inhibitor is per-surface
instead of global it allows a finer control over which displays get
dimmed for instance. For every case not supported by this protocol, a
fallback to the DBus version is used.
It can’t do anything if the GtkWindow isn’t passed, which might warrant
some documentation change to encourage users to not use NULL for this
argument.
This has been tested on Sway.
Fixes #2202.
Emmanuel Gil Peyrot [Tue, 14 Jul 2020 19:18:03 +0000 (21:18 +0200)]
gdk/wayland: Add an API to inhibit and uninhibit idle
This uses the idle-inhibit protocol from wayland-protocols, to attach an
inhibitor to the GdkSurface. The inhibit function can be called as many
times as the user wants, but the uninhibit function MUST be called as
many times to unset the idle inhibition.
This has been tested on Sway.
Matthias Clasen [Tue, 14 Jul 2020 18:47:23 +0000 (14:47 -0400)]
Fix shortcuts section reflow
When this code was ported from gtk_container_get_children
to the dom api, we inadvertendly inverted the order of the
list in one place. With the dom api, we can just avoid
reversing lists altogether, so do that.
Fixes: #2928
Ray Strode [Tue, 14 Jul 2020 13:40:34 +0000 (09:40 -0400)]
x11: Don't set up frame sync fence on unsupported compositors
Not all compositors support _NET_WM_FRAME_DRAWN. In cases
where the compositor doesn't support _NET_WM_FRAME_DRAWN we don't
need to do all the fancy damage tracking and fence watching.
Furthermore, if the compositor doesn't support _NET_WM_FRAME_DRAWN,
it's possible that one frame will start before the previous frame has
made it through the pipeline, leading to a blown assertion.
This commit side-steps the unnecessary code and associated assertion
when _NET_WM_FRAME_DRAWN isn't supported.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2927
Florentina Mușat [Tue, 14 Jul 2020 14:52:19 +0000 (14:52 +0000)]
Update Romanian translation
Matthias Clasen [Tue, 14 Jul 2020 11:47:36 +0000 (11:47 +0000)]
Merge branch 'wip/jimmac/large-title-letterspacing' into 'master'
Adwaita: revert letter-spacing for large-title
Closes #2932
See merge request GNOME/gtk!2243
Yuri Chornoivan [Tue, 14 Jul 2020 10:33:34 +0000 (10:33 +0000)]
Update Ukrainian translation
Jakub Steiner [Tue, 14 Jul 2020 10:24:25 +0000 (12:24 +0200)]
Adwaita: revert letter-spacing for large-title
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2932
Jakub Steiner [Mon, 13 Jul 2020 14:01:01 +0000 (16:01 +0200)]
Adwaita: sidebar color for file picker
- use menu like hovers and desaturated selected_bg_color
Partially addresses https://gitlab.gnome.org/GNOME/gtk/-/issues/1586
Matthias Clasen [Tue, 14 Jul 2020 02:43:25 +0000 (02:43 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2241
Matthias Clasen [Tue, 14 Jul 2020 00:49:56 +0000 (20:49 -0400)]
inspector: Show some information about expressions
This is not too useful, but better than nothing.
Matthias Clasen [Tue, 14 Jul 2020 00:19:07 +0000 (20:19 -0400)]
expression: Add some introspection
Add a few apis to peek inside expressions, mainly
for the benefit of GtkInspector and similar uses.
Matthias Clasen [Mon, 13 Jul 2020 21:54:27 +0000 (17:54 -0400)]
gtk-demo: Make the words demo expand
We want to fill the window here.
Matthias Clasen [Mon, 13 Jul 2020 21:32:52 +0000 (17:32 -0400)]
inspector: Ellipsize in the object tree
We don't want a long label to blow up the width
of the inspector window.
Matthias Clasen [Mon, 13 Jul 2020 21:13:43 +0000 (17:13 -0400)]
inspector: Fix up input enum names
We've recently added and removed a few values in these
enumerations. Keep the names in sync, so we don't show
nonsense.
Matthias Clasen [Mon, 13 Jul 2020 20:54:05 +0000 (16:54 -0400)]
NEWS: Updates and fixes
Matthias Clasen [Mon, 13 Jul 2020 20:48:08 +0000 (20:48 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2240
Matthias Clasen [Mon, 13 Jul 2020 19:06:35 +0000 (15:06 -0400)]
treeexpander: Be focusable
We need to be focusable so that we can take focus
if the child doesn't.
Matthias Clasen [Mon, 13 Jul 2020 19:06:08 +0000 (15:06 -0400)]
searchbar: Set a focus vfunc
We don't want to take focus ourselves here.
Matthias Clasen [Mon, 13 Jul 2020 16:31:07 +0000 (16:31 +0000)]
Merge branch 'wip/jimmac/file-dialog-sidebar-color' into 'master'
Adwaita: sidebar color for file picker
Closes #1586
See merge request GNOME/gtk!2238
Jakub Steiner [Mon, 13 Jul 2020 14:01:01 +0000 (16:01 +0200)]
Adwaita: sidebar color for file picker
- avoid using the selected blue for the sidebar
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/1586
Matthias Clasen [Mon, 13 Jul 2020 14:38:03 +0000 (14:38 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2236
Matthias Clasen [Mon, 13 Jul 2020 14:32:06 +0000 (14:32 +0000)]
Merge branch 'wip/carlosg/windowhandle-gesture-state' into 'master'
gtkwindowhandle: Only claim gesture on action
See merge request GNOME/gtk!2237
Yuri Chornoivan [Mon, 13 Jul 2020 14:18:40 +0000 (14:18 +0000)]
Update Ukrainian translation
Carlos Garnacho [Mon, 13 Jul 2020 13:44:58 +0000 (15:44 +0200)]
gtkwindowhandle: Only claim gesture on action
The press gesture does not need to set claimed state just for n-press
tracking, it will however reset all other click gestures on each press
if the event gets propagated all the way up.
Fixes tracking of multi-press in gestures in widgets that are children
of the window handle. E.g. the headerbar listview in the "File browser"
gtk4-demo demo.
Matthias Clasen [Mon, 13 Jul 2020 12:26:20 +0000 (08:26 -0400)]
Give the inspector a devel header too
Lets clearly communicate that we're unstable.
Matthias Clasen [Mon, 13 Jul 2020 12:23:39 +0000 (08:23 -0400)]
print-editor: Set the devel style class
Lets clearly communicate that we're unstable.
Matthias Clasen [Mon, 13 Jul 2020 11:29:03 +0000 (07:29 -0400)]
Integrate the new icons
Install and use the node-editor and print-editor icons.
Jakub Steiner [Mon, 13 Jul 2020 09:57:14 +0000 (11:57 +0200)]
demos: icons for Print and Node Editors
- probably needs meson build hooks
Piotr Drąg [Mon, 13 Jul 2020 11:17:37 +0000 (13:17 +0200)]
Update POTFILES.in
Matthias Clasen [Sun, 12 Jul 2020 23:16:35 +0000 (23:16 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
gtk-demo: Work harder to filter the tree
See merge request GNOME/gtk!2234
Matthias Clasen [Sun, 12 Jul 2020 22:24:04 +0000 (18:24 -0400)]
gtk-demo: Work harder to filter the tree
Arrange for an item to be visible if it either
matches the filter or has children that do.
Matthias Clasen [Sun, 12 Jul 2020 21:23:07 +0000 (21:23 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2233
Matthias Clasen [Sun, 12 Jul 2020 20:47:51 +0000 (16:47 -0400)]
demo: Clear filter when search is stopped
When the search entry disappears on Escape,
reset the search string to "", so we don't
end up with a filtered list and no obvious
way to remove the filtering.
Matthias Clasen [Sun, 12 Jul 2020 20:26:17 +0000 (16:26 -0400)]
gtk-demo: Make the search bar appear for typing
Having the search bar present from the start is
a bit jarring. Make it appear when called for.
Matthias Clasen [Sun, 12 Jul 2020 20:25:24 +0000 (16:25 -0400)]
searchbar: Add a key-capture-widget property
This is handy to set up this relationship in ui files,
and also makes it accessible in the inspector.
Matthias Clasen [Sun, 12 Jul 2020 19:04:00 +0000 (19:04 +0000)]
Merge branch 'wip/sadiq/demo-filter' into 'master'
demo: Add a search filter
See merge request GNOME/gtk!2232
Matthias Clasen [Sun, 12 Jul 2020 16:59:10 +0000 (16:59 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2231
Mohammed Sadiq [Sun, 12 Jul 2020 15:39:27 +0000 (21:09 +0530)]
demo: Add a search filter
Matthias Clasen [Sun, 12 Jul 2020 14:43:51 +0000 (10:43 -0400)]
Fix gtk_file_chooser_error_stack_set_custom_error
This never worked, due to a typo.
Matthias Clasen [Sun, 12 Jul 2020 14:35:43 +0000 (10:35 -0400)]
Drop GtkFileChooserEmbed
This private interface is no longer used.
Matthias Clasen [Sun, 12 Jul 2020 16:14:32 +0000 (12:14 -0400)]
filechooserdialog: Stop using ::response-requested
Replace the ::response-requested signal by an action.
Matthias Clasen [Sun, 12 Jul 2020 14:34:27 +0000 (10:34 -0400)]
filechooserdialog: Stop using the embed interface
Just call private GtkFileChooserWidget api. There
is no real justification for diverting this through
an extra interface.
Matthias Clasen [Sun, 12 Jul 2020 14:26:34 +0000 (10:26 -0400)]
Remove unused includes
Only GtkFileChooserWidget and GtkFileChooserDialog
use the GtkFileChooserEmbed interface.
Matthias Clasen [Sun, 12 Jul 2020 14:20:52 +0000 (10:20 -0400)]
filechooserwidget: Use dropdown api better
We now have GtkStringList, so we can implement
the choice api a little cleaner with it.
Matthias Clasen [Sun, 12 Jul 2020 14:05:57 +0000 (10:05 -0400)]
filechooserwidget: Remove homegrown profiling
We have sysprof support now, so we no longer have
to use this homegrown profiler.